package com.xbongbong.pro.statistics.service.impl;

import com.xbongbong.config.DataSource;
import com.xbongbong.config.DataSourceNames;
import com.xbongbong.paas.domain.entity.ext.CkPaasFormDataEntityExt;
import com.xbongbong.pro.statistics.model.StarPaasDataModel;
import com.xbongbong.pro.statistics.service.StarDataService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 描述信息
 *
 * @ClassName StarDataServiceImpl
 * @Author 梁鲁江
 * 创建时间 2022/8/29 14:43
 * 修改时间  2022/8/29 14:43
 **/
@Service
public class StarDataServiceImpl implements StarDataService {
    @Resource
    private StarPaasDataModel starPaasDataModel;
    
    @DataSource(DataSourceNames.STAR_DATA)
    @Override
    public List findListMapBySql(String sql) {
        return starPaasDataModel.findListMapBySql(sql);
    }

    @DataSource(DataSourceNames.STAR_DATA)
    /**
     * @author  gzt
     * @Description 带泛型的返回，关联产品专用
     * @Date  2022/11/15
     * @param sql
     * @return java.util.List<com.xbongbong.paas.domain.entity.ext.CkPaasFormDataEntityExt>
     * @throws
     **/
    @Override
    public List<CkPaasFormDataEntityExt> findEntitysBySql(String sql) {
        return starPaasDataModel.findEntitysBySql(sql);
    }

    @DataSource(DataSourceNames.STAR_DATA)
    @Override
    public Integer countBySql(String sql) {
        return starPaasDataModel.countBySql(sql);
    }
}
